'''
Created on Dec 8, 2015

@author: JimmyMo
'''
# from resourcecare.configuration.confignode import ConfigNode

class Filter(object):
    '''
    classdocs
    '''
    def __init__(self, enabled, name, collector, ruleprocessor):
#         super().__init__(enabled, name)
        self.enabled = enabled
        self.name = name
        self.collector = collector
        self.ruleprocessor = ruleprocessor
    
    def do_filter(self):
        source = self.collector.do_collect()
        self.ruleprocessor.do_process(source);
        self.matched = self.ruleprocessor.result != ""
        return self.matched
